1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
| \documentclass[crop, tikz]{standalone}
\usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{shapes, calc, shapes, arrows}
\begin{document}
\tikzstyle{inputNode}=[draw,circle,minimum size=25pt,inner sep=0pt] \tikzstyle{inputNode1}=[draw,circle,minimum size=35pt,inner sep=0pt] \tikzstyle{stateTransition}=[->, thick] \begin{tikzpicture}
\node[inputNode] (x0) at (-3, 3.4) {\color{red}$x^{(0)}$}; \node[inputNode] (x1) at (-3, 1.75) {\color{red}$x^{(1)}$}; \node (dots) at (-3, 0.75) {$\vdots$}; \node[inputNode] (xi) at (-3, -0.75) {\color{red}$x^{(i)}$}; \node (dots) at (-3, -1.75) {$\vdots$}; \node[inputNode] (xI) at (-3, -3.4) {\color{red}$x^{(I)}$}; \node[inputNode1] (z0) at (0, 3.4) {\color{green}$z^{(0)}$}; \node[inputNode1] (z1) at (0, 1.75) {\color{green}$\alpha^{(1)} z^{(1)}$}; \draw[dashed] (0,1.75-0.5) -- (0,1.75+0.5); \node (dots) at (0, 0.75) {$\vdots$}; \node[inputNode1] (zj) at (0, -0.75) {\color{green}$\alpha^{(j)} z^{(j)}$}; \draw[dashed] (0,-0.75-0.5) -- (0,-0.75+0.5); \node (dots) at (0, -1.75) {$\vdots$}; \node[inputNode1] (zJ) at (0, -3.4) {\color{green}$\alpha^{(J)} z^{(J)}$}; \draw[dashed] (0,-3.2-0.5) -- (0,-3.2+0.5);
\node[inputNode1] (y1) at (3, 1.75) {\color{blue}$\beta^{(1)} \hat y^{(1)}$}; \draw[dashed] (3,1.75-0.5) -- (3,1.75+0.5); \node (dots) at (3, 0.75) {$\vdots$}; \node[inputNode1] (yk) at (3, -0.75) {\color{blue}$\beta^{(k)} \hat y^{(k)}$}; \draw[dashed] (3,-0.75-0.5) -- (3,-0.75+0.5); \node (dots) at (3, -1.75) {$\vdots$}; \node[inputNode1] (yK) at (3, -3.4) {\color{blue}$\beta^{(K)} \hat y^{(K)}$}; \draw[dashed] (3,-3.4-0.5) -- (3,-3.4+0.5);
\draw[stateTransition,opacity=0.2] (x0) to node [midway, sloped, above=-2,xshift=-25] {} (z1); \draw[stateTransition,opacity=0.2] (x1) to node [midway, sloped, above=-2,xshift=-15] {} (z1); \draw[stateTransition,opacity=0.2] (xi) to node [midway, sloped, above=-2,xshift=-15] {} (z1); \draw[stateTransition,opacity=0.2] (xI) to node [midway, sloped, above=-2,xshift=-15] {} (z1);
\draw[stateTransition] (x0) to node [midway, sloped, above=-2,xshift=-35] {\color{red!60!green}$\omega_{0j}^{(1)}$} (zj); \draw[stateTransition] (x1) to node [midway, sloped, above=-2,xshift=-25] {\color{red!60!green}$\omega_{1j}^{(1)}$} (zj); \draw[stateTransition] (xi) to node [midway, sloped, above=-2,xshift=-15] {\color{red!60!green}$\omega_{ij}^{(1)}$} (zj); \draw[stateTransition] (xI) to node [midway, sloped, above=-2,xshift=-15] {\color{red!60!green}$\omega_{Ij}^{(1)}$} (zj);
\draw[stateTransition,opacity=0.2] (x0) to node [midway, sloped, above=-2,xshift=-35] {} (zJ); \draw[stateTransition,opacity=0.2] (x1) to node [midway, sloped, above=-2,xshift=-25] {} (zJ); \draw[stateTransition,opacity=0.2] (xi) to node [midway, sloped, above=-2,xshift=-15] {} (zJ); \draw[stateTransition,opacity=0.2] (xI) to node [midway, sloped, above=-2,xshift=-15] {} (zJ);
%-----------% \draw[stateTransition,opacity=0.2] (z0) to node [midway, sloped, above=-2,xshift=-25] {} (y1); \draw[stateTransition,opacity=0.2] (z1) to node [midway, sloped, above=-2,xshift=-15] {} (y1); \draw[stateTransition,opacity=0.2] (zj) to node [midway, sloped, above=-2,xshift=-15] {} (y1); \draw[stateTransition,opacity=0.2] (zJ) to node [midway, sloped, above=-2,xshift=-15] {} (y1);
\draw[stateTransition] (z0) to node [midway, sloped, above=-2,xshift=-35] {\color{green!60!blue}$\omega_{0k}^{(2)}$} (yk); \draw[stateTransition] (z1) to node [midway, sloped, above=-2,xshift=-25] {\color{green!60!blue}$\omega_{1k}^{(2)}$} (yk); \draw[stateTransition] (zj) to node [midway, sloped, above=-2,xshift=-15] {\color{green!60!blue}$\omega_{jk}^{(2)}$} (yk); \draw[stateTransition] (zJ) to node [midway, sloped, above=-2,xshift=-15] {\color{green!60!blue}$\omega_{Jk}^{(2)}$} (yk);
\draw[stateTransition,opacity=0.2] (z0) to node [midway, sloped, above=-2,xshift=-35] {} (yK); \draw[stateTransition,opacity=0.2] (z1) to node [midway, sloped, above=-2,xshift=-25] {} (yK); \draw[stateTransition,opacity=0.2] (zj) to node [midway, sloped, above=-2,xshift=-15] {} (yK); \draw[stateTransition,opacity=0.2] (zJ) to node [midway, sloped, above=-2,xshift=-15] {} (yK);
\color{blue} \draw[stateTransition] (yk) node [midway,above=2cm,xshift=6cm] {$\color{green}\alpha^{(j)}\color{black}=\color{black}\sum\limits_{i=0}^{I}\color{red!60!green}\omega_{ij}^{(1)}\color{red}x^{(i)}\color{black}$}; \draw[stateTransition] (yk) node [midway,above=1cm,xshift=6cm] {$\color{green}z^{(j)}\color{black}=\color{black}\sigma\left(\color{green}\alpha^{(j)}\color{black}\right)$};
\draw[stateTransition] (yk) node [midway,above=0cm,xshift=6cm] {$\color{red}x^{(0)}\color{black}=\color{green}z^{(0)}\color{black}=1$};
\draw[stateTransition] (yk) node [midway,below=0.25cm,xshift=6cm] {$\color{blue}\beta^{(k)}\color{black}=\sum\limits_{j=0}^{J}\color{green!60!blue}\omega_{jk}^{(2)}\color{green}z^{(j)}\color{black}$};
\draw[stateTransition] (yk) node [midway,below=1.35cm,xshift=6cm] {$\color{blue}\hat y^{(k)}\color{black}=\color{black}\sigma\left(\color{blue}\beta^{(k)}\color{black}\right)$};
\end{tikzpicture}
\end{document}
|